package com.dms.modules.product.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;
import java.util.List;

@Data
@EqualsAndHashCode(callSuper = false)
@TableName("product_category")
@ApiModel("商品分类")
public class ProductCategory {
    
    @TableId(type = IdType.AUTO)
    @ApiModelProperty("分类ID")
    private Long id;
    
    @ApiModelProperty("父分类ID")
    private Long parentId;
    
    @ApiModelProperty("分类名称")
    private String name;
    
    @ApiModelProperty("分类层级")
    private Integer level;
    
    @ApiModelProperty("排序")
    private Integer sort;
    
    @ApiModelProperty("图标")
    private String icon;
    
    @ApiModelProperty("分类描述")
    private String description;
    
    @ApiModelProperty("是否显示：0-不显示，1-显示")
    private Integer showStatus;
    
    @ApiModelProperty("分类维度：一次元、二次元、三次元")
    private String dimension;
    
    @ApiModelProperty("是否显示：0-不显示，1-显示")
    private Integer visible;
    
    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    
    @ApiModelProperty("更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
    
    @ApiModelProperty("是否删除")
    @TableLogic
    private Boolean deleted;
    
    @TableField(exist = false)
    @ApiModelProperty("子分类列表")
    private List<ProductCategory> children;
} 